package com.ksyun.campus.metaserver.bootstrap;

import com.ksyun.campus.common.domain.MetaServer;

/**
 * @author zhaozhikai
 * @date 2023/8/8 0:18
 */
public class MetaServerInstance {
    private static MetaServer metaServer;

    public static MetaServer init(String ipAddress, int port) {
        if (metaServer == null) {
            metaServer = new MetaServer();
            metaServer.setIp(ipAddress);
            metaServer.setPort(port);
        }
        return metaServer;
    }

    public static MetaServer getMateServer() {
        return metaServer;
    }
}
